<?php
namespace app\common\validate;

use think\Validate;

class FollowValidate extends Validate
{
    protected $rule =   [
        'user_id|用户ID'          => 'require|integer',
        'to_user_id|对方用户ID'   => 'require|integer',
        'type|数据类型'           => 'require|in:1,2',
        'page|页数'               => 'require|integer',
        'limit|条数'              => 'require|integer',
    ];
    
    protected $scene = [
        'list'     => ['user_id', 'type', 'page', 'limit'],
        'set'      => ['user_id', 'to_user_id'],
    ];
}